package com.fw.service.persistence.dao;

import java.util.List;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

import com.fw.service.persistence.dto.RoleMerchant;

public interface RoleMerchantDAO extends JpaRepository<RoleMerchant, Long>, JpaSpecificationExecutor<RoleMerchant> {
    @Query("select t from RoleMerchant t where t.roleType = :roleType and t.roleStatus = :roleStatus")
    public List<RoleMerchant> selectByRoleTypeAndRoleStatus(@Param("roleType") String roleType, @Param("roleStatus") String roleStatus);

    @Query("select t from RoleMerchant t where t.roleName = :roleName")
    public RoleMerchant findByRoleName(@Param("roleName") String roleName);
}
